public class Solver extends Sudoku{

//public Solver(){}

public static boolean solve(int[][] board) 
{
	
	// Find a position that's still empty.
	for (int x=0; x<9; x++) 
	{
	    for (int y=0; y<9; y++) 
	    {
			if (board[x][y] == 0) 
			{
		    		// Try each possibile value in this space
		    		// and see if the rest of the puzzle can be filled in.
		    	for (board[x][y]=1; board[x][y]<=9; board[x][y]++) 
		    	{
					if (IsLegal.isLegal(board) && Solver.solve(board)) 
					{
			    		return true;
					}
		   		}
		    // There is no value that we can put in the first
		    // empty space that was found, so the puzzle is
		    // unsolvable given the values put in up to this
		    // point.
		    	board[x][y] = 0;
		    	return false;
			}
	    }
	}
}
}